package com.creditease.tmsp.common.persistence;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

public class IdGenerator {
	private static SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
	public static String getId(){
		String t  = sdf.format(new Date());
		String uuid = UUID.randomUUID().toString();
		String[] uuids = uuid.split("-");
		return t+uuids[3].substring(1)+uuids[4];
	}
	public static void main(String[] args) {
		for (int i = 0; i < 100; i++) {
			
			System.out.println(IdGenerator.getId());
		}
	}
}
